Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.get = exports.put = void 0;

var t = require("./config.js"), e = function(e, r) {
    var o = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
    return wx.pro.request({
        url: t.baseURL + r,
        method: e,
        data: o
    }).then(function(t) {
        if (t.statusCode >= 400) throw wx.showModal({
            content: "服务器出错，请联系管理员"
        }), new Error("HttpError " + t.statusCode);
        return t.data;
    });
};

exports.put = function(t, r) {
    return e("PUT", t, r);
}, exports.get = function(t, r) {
    return e("GET", t);
};

exports.default = e;